/**
 * com.cnhis.his.customer.mapper.Persons.java
 */
package com.mbmed.doctor.login.mapper;

import javax.xml.bind.annotation.XmlRootElement;

import com.mbmed.doctor.commons.utils.BaseVO;



/**
 * @file  Persons.java
 * @author yangzhengxin(Jason)
 * @version 0.1
 * @todo	Persons数据值
 * Copyright(C), 2013-2014
 *		 Shenzhen Coordinates Software Development Co., Ltd.
 * History
 *   	1. Date: 2014-01-14 05:21:04
 *      	Author: yangzhengxin(Jason)
 *      	Modification: this file was created
 *   	2. ...
 */
@XmlRootElement
public class Person extends BaseVO implements java.io.Serializable{

	private java.lang.Integer idP;
	private java.lang.String lastname;
	private java.lang.String firstname;
	private java.lang.String address;
	private java.lang.String city;
	public Person(){
	}

	public Person(
		java.lang.Integer idP
	){
		this.idP = idP;
	}



	public void setIdP(java.lang.Integer value) {
		this.idP = value;
	}	
	public java.lang.Integer getIdP() {
		return this.idP;
	}

	public void setLastname(java.lang.String value) {
		this.lastname = value;
	}	
	public java.lang.String getLastname() {
		return this.lastname;
	}

	public void setFirstname(java.lang.String value) {
		this.firstname = value;
	}	
	public java.lang.String getFirstname() {
		return this.firstname;
	}

	public void setAddress(java.lang.String value) {
		this.address = value;
	}	
	public java.lang.String getAddress() {
		return this.address;
	}

	public void setCity(java.lang.String value) {
		this.city = value;
	}	
	public java.lang.String getCity() {
		return this.city;
	}


    public String toString() {
		  StringBuffer buffer = new StringBuffer();
		  buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");	
			   buffer.append("IdP").append("='").append(getIdP()).append("' ");	
			   buffer.append("Lastname").append("='").append(getLastname()).append("' ");	
			   buffer.append("Firstname").append("='").append(getFirstname()).append("' ");	
			   buffer.append("Address").append("='").append(getAddress()).append("' ");	
			   buffer.append("City").append("='").append(getCity()).append("' ");	
		  buffer.append("]");
		  return buffer.toString();
	}		

	public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof Person) ) return false;
		 Person  castOther = ( Person) other;  
		 return 
					( (this.getIdP()==castOther.getIdP()) ||( this.getIdP()!=null && castOther.getIdP()!=null && this.getIdP().equals(castOther.getIdP()) ) )
					&&( (this.getLastname()==castOther.getLastname()) ||( this.getLastname()!=null && castOther.getLastname()!=null && this.getLastname().equals(castOther.getLastname()) ) )
					&&( (this.getFirstname()==castOther.getFirstname()) ||( this.getFirstname()!=null && castOther.getFirstname()!=null && this.getFirstname().equals(castOther.getFirstname()) ) )
					&&( (this.getAddress()==castOther.getAddress()) ||( this.getAddress()!=null && castOther.getAddress()!=null && this.getAddress().equals(castOther.getAddress()) ) )
					&&( (this.getCity()==castOther.getCity()) ||( this.getCity()!=null && castOther.getCity()!=null && this.getCity().equals(castOther.getCity()) ) )
			;
    }

	public int hashCode() {
         int result = 17;
				  result = 37 * result + (getIdP() == null ? 0 : this.getIdP().hashCode() );
				  result = 37 * result + (getLastname() == null ? 0 : this.getLastname().hashCode() );
				  result = 37 * result + (getFirstname() == null ? 0 : this.getFirstname().hashCode() );
				  result = 37 * result + (getAddress() == null ? 0 : this.getAddress().hashCode() );
				  result = 37 * result + (getCity() == null ? 0 : this.getCity().hashCode() );
         return result;
	} 
	
}
